<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAlbumTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateAlbumLabel_idAlbum}" for="idAlbum" />
                    <h:inputText id="idAlbum" value="#{albumController.selected.idAlbum}" title="#{bundle.CreateAlbumTitle_idAlbum}" required="true" requiredMessage="#{bundle.CreateAlbumRequiredMessage_idAlbum}"/>
                    <h:outputLabel value="#{bundle.CreateAlbumLabel_titulo}" for="titulo" />
                    <h:inputText id="titulo" value="#{albumController.selected.titulo}" title="#{bundle.CreateAlbumTitle_titulo}" required="true" requiredMessage="#{bundle.CreateAlbumRequiredMessage_titulo}"/>
                    <h:outputLabel value="#{bundle.CreateAlbumLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{albumController.selected.descricao}" title="#{bundle.CreateAlbumTitle_descricao}" required="true" requiredMessage="#{bundle.CreateAlbumRequiredMessage_descricao}"/>
                    <h:outputLabel value="#{bundle.CreateAlbumLabel_fkUsuario}" for="fkUsuario" />
                    <h:selectOneMenu id="fkUsuario" value="#{albumController.selected.fkUsuario}" title="#{bundle.CreateAlbumTitle_fkUsuario}" required="true" requiredMessage="#{bundle.CreateAlbumRequiredMessage_fkUsuario}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateAlbumLabel_fkObra}" for="fkObra" />
                    <h:selectOneMenu id="fkObra" value="#{albumController.selected.fkObra}" title="#{bundle.CreateAlbumTitle_fkObra}" required="true" requiredMessage="#{bundle.CreateAlbumRequiredMessage_fkObra}">
                        <f:selectItems value="#{projetoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateAlbumLabel_data}" for="data" />
                    <h:inputText id="data" value="#{albumController.selected.data}" title="#{bundle.CreateAlbumTitle_data}" required="true" requiredMessage="#{bundle.CreateAlbumRequiredMessage_data}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{albumController.create}" value="#{bundle.CreateAlbumSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{albumController.prepareList}" value="#{bundle.CreateAlbumShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateAlbumIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
